/*
 * @Author: sonss
 * @Date: 2024-08-27 11:45:22
 * @LastEditTime: 2024-08-27 12:10:17
 * @FilePath: /ss-file-antd/src/services/assets_file.ts
 * @Description:  资源文件
 */
import { request } from '@umijs/max';

// 分页列表
export async function Search(body?: ASSETS.FILE.SearchRequest) {
  return request<API.Result<ASSETS.FILE.SearchResponse>>('/v1/assets/file/search', {
    method: 'POST',
    data: body || {},
  });
}

// 详情
export async function Detail(body: ASSETS.FILE.GetRequest) {
  return request<API.Result<ASSETS.FILE.DetailResponse>>('/v1/assets/file/detail', {
    method: 'POST',
    data: body,
  });
}

// 批量创建
export async function BatchCreate(body: ASSETS.FILE.BatchCreateForm) {
  return request<API.Result<any>>('/v1/assets/file/batch-create', {
    method: 'POST',
    data: body,
  });
}

// 保存
export async function Save(body: ASSETS.FILE.SaveForm) {
  return request<API.Result<any>>('/v1/assets/file/save', {
    method: 'POST',
    data: body,
  });
}

// 更新
export async function Update(body: ASSETS.FILE.UpdateForm) {
  return request<API.Result<any>>('/v1/assets/file/update', {
    method: 'POST',
    data: body,
  });
}

// 移除
export async function Remove(body: ASSETS.FILE.RemoveForm) {
  return request<API.Result<any>>('/v1/assets/file/remove', {
    method: 'POST',
    data: body,
  });
}
